<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui">
<f:view>
	<h:head>
		<link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/default.css" />
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/syntaxhighlighter/syntaxhighlighter.css" />
		<style type="text/css">
.ui-message-error-detail{
	font-family: Arial, sans-serif;
	font-size: 0.8em;
}
#midiv {
	    position: absolute;
	    left: 50%;
	    top: 50%;
	    height: 300px;
	    margin-top: -162px;
	    width: 505px;
	    margin-left: -241px;
	}
</style>
	</h:head>
	<script language="JavaScript" type="text/javascript">
		window.history.forward(-1);
	</script>
	<p:dialog modal="true" widgetVar="statusDialog" closeOnEscape="false" resizable="false"
		header="Ingresando al sistema" draggable="false" closable="false">
		<p:graphicImage value="/images/ajaxloadingbar.gif" />
	</p:dialog>
	<f:loadBundle var="message" basename="com.edicsem.pe.sie.client.properties.ApplicationResources"/>
	
	<h:form>
	<div></div>
		<div id="midiv" style="background-image: url(images/intranet_login.jpg); width: 505px; height: 300px;">
			<br /> <br /> <br /> <br /> <br /> <br /><br />
			<div align="center">
				<table>
					<tr>
						<th align="right">
						<h:outputText value="#{message['login.usuario']}" style="width: 30px; " /></th>
						<td align="left">
						<p:inputText id="txtUsuario"
								value="#{login.usuario}" style="width: 160px; "
								required="true" requiredMessage="#{message['login.usuario.validation']}" /></td>
						<td>
						<p:watermark for="txtUsuario" value="usuario" />
						<p:message for="txtUsuario" /></td>
					</tr>
					<tr><td><br /></td></tr>
					<tr>
						<th align="right">
						<h:outputText value="#{message['login.password']}" style="width: 30px;"/> 
						</th>
						<td align="left">
						<p:password  id="txtPasswordL" value="#{login.contrasenia}" style="width: 160px; "
								required="true" requiredMessage="#{message['login.password.validation']}" /></td>
						<td>
						<p:watermark for="txtPasswordL" value="*****" /> 
						<p:message for="txtPasswordL" /></td>
					</tr>
				</table>
			</div>
			<br/>
			<br/>
			<div align="center">
				<h:panelGrid columns="3">
					<p:commandButton icon="images/user_log.png" value="Ingresar"
						title="Ingresar al sistema" action="#{login.ingresarUsuario}" ajax="false"
						onclick="statusDialog.show();"  />
					<p:spacer width="20" />
					
				</h:panelGrid>
			</div>
		</div>
	</h:form>
<p:growl id="msg" showDetail="true" life="10000"  />
</f:view>
</html>